<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('profitAddup列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <input type="hidden" th:value="${profitId}" id="profitId" name="id">
<!--                            <li>-->
<!--                                <label>日期：</label>-->
<!--                                <input type="text" name="dateInfo" id="dateInfo"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>产品信息：</label>-->
<!--                                <input type="text" name="productId"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>产品名称：</label>-->
<!--                                <input type="text" name="productName"/>-->
<!--                            </li>-->
                            <li>
                                <label>注册渠道：</label>
                                <select name="channelCode" id="chCode">
                                    <option value="">所有</option>
                                    <option  th:each="item:${channelInfoList}" th:text="${item.name}" th:value="${item.value}" ></option>
                                </select>
                            </li>
                            <li>
                                <label>请求渠道：</label>
                                <select name="reqChannelCode">
                                    <option value="">所有</option>
                                    <option  th:each="item:${channelInfoList}" th:text="${item.name}" th:value="${item.value}" ></option>
                                </select>
                            </li>
                            <li>
                                <label>场景类型：</label>
                                <select name="sceneId">
                                    <option value="">所有</option>
                                    <option  th:each="item:${sceneInfoList}" th:text="${item.label}" th:value="${item.value}" ></option>
                                </select>
                            </li>
<!--                            <li>-->
<!--                                <label>是否为联登产品：</label>-->
<!--                                <input type="text" name="productUnionFlag"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>用户ID：</label>-->
<!--                                <input type="text" name="uid"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>用户ip：</label>-->
<!--                                <input type="text" name="ip"/>-->
<!--                            </li>-->
<!--                            <input type="hidden" th:value="${chCode}" id="chCode" name="chCode">-->
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
<!--                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="product:profitAddup:add">-->
<!--                    <i class="fa fa-plus"></i> 添加-->
<!--                </a>-->
<!--                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="product:profitAddup:edit">-->
<!--                    <i class="fa fa-edit"></i> 修改-->
<!--                </a>-->
<!--                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="product:profitAddup:remove">-->
<!--                    <i class="fa fa-remove"></i> 删除-->
<!--                </a>-->
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="product:profitAddup:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>

            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('product:profitAddup:edit')}]];
        var removeFlag = [[${@permission.hasPermi('product:profitAddup:remove')}]];
        var prefix = ctx + "product/profitAddup";

        $(function() {
            var options = {
                url: prefix + "/list/"+$("#profitId").val(),// + "?chCode="+$("#chCode").val(),
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export/"+$("#profitId").val(),
                modalName: "profitAddup",
                columns: [
                //     {
                //     checkbox: true
                // },
                {
                    field: 'id',
                    title: '',
                    visible: false
                },
                {
                    field: 'dateInfo',
                    title: '日期'
                },
                {
                    field: 'productId',
                    title: '产品信息'
                },
                {
                    field: 'productName',
                    title: '产品名称'
                },
                {
                    field: 'descInfo',
                    title: '场景类型'
                },
                // {
                //     field: 'productUnionFlag',
                //     title: '是否为联登产品',
                //     formatter: function (value,row,index){
                //         return row.productUnionFlag?'<span class="badge badge-primary">是</span>':'<span class="badge badge-danger">否</span>';
                //     }
                // },
                {
                    field: 'uidStr',
                    title: '用户ID'
                },
                {
                    field: 'channelName',
                    title: '注册渠道'
                },
                {
                    field: 'reqChannelName',
                    title: '请求渠道'
                },
                {
                    field: 'clientType',
                    title: '客户端'
                },
                {
                    field: 'ip',
                    title: '用户ip'
                }
                ,
                {
                    field: 'createTime',
                    title: '创建时间'
                }
                // ,
                // {
                //     title: '操作',
                //     align: 'center',
                //     formatter: function(value, row, index) {
                //         var actions = [];
                //         actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                //         actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                //         return actions.join('');
                //     }
                // }
                ]
            };
            $.table.init(options);
        });

        layui.use('laydate', function(){
            var laydate = layui.laydate;

            laydate.render({
                elem: '#dateInfo',
                type: 'date',
            });

        });

    </script>
</body>
</html>